﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace Wala.Connection.Objects.Profiles
{
    public class ShortProfiles
    {
        private List<ShortProfile> short_profiles;

        public List<ShortProfile> Short_profiles
        {
            get { return short_profiles; }
            set { short_profiles = value; }
        }

        public ShortProfiles()
        {
            short_profiles = new List<ShortProfile>();
        }

        public ShortProfiles(List<ShortProfile> shortProfiles)
        {
            this.short_profiles = shortProfiles;
        }

        public static ShortProfiles FromJson(string json)
        {
            try
            {
                ShortProfiles shortProfiles = JsonConvert.DeserializeObject<ShortProfiles>(json);
                return shortProfiles;
            }
            catch (Exception ex)
            {
                return new ShortProfiles();
            }
        }
    }
}
